package com.highspeed.bdk.gateway.socket.analyze.message.gui.resolver;

import com.highspeed.bdk.gateway.Util;
import com.highspeed.bdk.gateway.socket.analyze.message.gui.base.MessageResolver;

import java.util.Map;

/**
 * 3.28寄存器写反馈
 * typedef struct _register_write
 * {
 * U16 reseved;
 * U32 result;
 * } Register Write FbData;
 * typedef struct _nmsChange
 * {
 * U32 ipAddr; //当前网管的 ip地址
 * } NmsChangeFbData;
 */
public class RegisterWriteResolver0x21 extends MessageResolver {

    @Override
    protected Map doResolveBody(byte[] response) {
        short reseved = Util.getShort(response, getOffset());
        offset2();
        logger.info("reseved ................" + reseved);
        int result = Util.getInt(response, getOffset());
        offset4();
        logger.info("result ................" + result);
        return getContainer();
    }
}
